<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%-- 
    JSP Name : da_100_08K.jsp
    Description : 사회 공헌 이벤트 등록
    author Seung Won
    since 2012. 8. 13.
    version 1.0
    Modification Information
       since          author              description
    ===========    =============    ===========================
    2012. 8. 13.     Seung Won     최초 생성
--%>

<%@ include file="/WEB-INF/jsp/co/us/include/declare.jspf" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>현대자동차CSR &#124; 사회복지 공모사업 이벤트</title>
<%@ include file="/WEB-INF/jsp/co/us/include/header.jspf" %>
<script type="text/javaScript" language="javascript">
<!--
$(document).ready(function() {
    /* form validation check */
    onloadCharCheck();
    
    $("#rgstButn").bind("click", moveRgstPage);    // 등록    
});

/*
 * 등록페이지 이동
 */
function moveRgstPage() {
    if (!validateForm($("#mainForm"))) {
        return;
    }
    
    $("#aplcEml").val($("#aplcEml1").val()+"@"+$("#aplcEml2").val());
    
    if($("#sbc").val().length > 300) {
        alert("300자 이내로 작성하여주세요");
        $("#sbc").focus();
        return;
    }
    
    $("#mainForm").attr('target','comIframe');
    <c:if test="${result.parp02Idx == null || result.parp02Idx == ''}">
    $("#mainForm").attr('action','/da_100_09.do').submit();
    </c:if>
    <c:if test="${result.parp02Idx != null && result.parp02Idx != ''}">
    $("#mainForm").attr('action','/da_100_11.do').submit();
    </c:if>
}

/*
 * 주소 찾기 팝업 창
 */
function popupCenter() {
   
    var left = (screen.width/2)-(445/2); 
    var top = (screen.height/2)-(490/2); 
    var targetWin = window.open ('/CO000013.do', 'adrPop', 'scrollbars=yes, toolbar=no, location=no, directories=no, status=no, menubar=no, resizable=no, copyhistory=no, width=445, height=490, top='+top+', left='+left); 
}
//-->
</script>
</head>
<body class="whiteBg">
<div class="popWrap">
    <div class="popCon">
        <p class="popTit"><img src="/img/usr/pop/pop_tit_evt_1.gif" alt="함께 움직이는 세상 공모사업" /></p>
        <form id="mainForm" name="mainForm" method="post" enctype="multipart/form-data">
            <input type="hidden" id="currentPageNo" name="currentPageNo" value="${rqInfo.currentPageNo}" />
            <input type="hidden" id="parp02Idx" name="parp02Idx" value="${result.parp02Idx }" />
            <input type="hidden" id="evntIdx" name="evntIdx" value="${rqInfo.idx }" />
        <table border="1" summary="함께 움직이는 세상 공모사업의 성명,분류구분, 비밀번호를 입력 또는 수정하는 표">
            <col width="16%" />
            <col width="84%" />
            <tbody>
                <tr>
                    <th>성명</th>
                    <td><input type="text" id="ppprNm" name="ppprNm" value="${result.ppprNm }" maxlength="6" nullable="true" title="성명" /></td>
                </tr>
                <tr>
                    <th>분류구분</th>
                    <td>
                            <select id="hdcClCd" name="hdcClCd">
                                <option value="1" <c:if test="${result.hdcClCd == '1' }">selected</c:if>>전체</option>
                                <option value="2" <c:if test="${result.hdcClCd == '2' }">selected</c:if>>사회복지 | 장애인</option>
                                <option value="3" <c:if test="${result.hdcClCd == '3' }">selected</c:if>>사회복지 | 아동 및 청소년</option>
                                <option value="4" <c:if test="${result.hdcClCd == '4' }">selected</c:if>>사회복지 | 노인</option>
                                <option value="5" <c:if test="${result.hdcClCd == '5' }">selected</c:if>>이동복지 | 장애인</option>
                                <option value="6" <c:if test="${result.hdcClCd == '6' }">selected</c:if>>이동복지 | 아동 및 청소년</option>
                                <option value="7" <c:if test="${result.hdcClCd == '7' }">selected</c:if>>이동복지 | 노인</option>
                                <option value="8" <c:if test="${result.hdcClCd == '8' }">selected</c:if>>기타</option>
                            </select>
                    </td>
                </tr>
                <tr>
                    <th>비밀번호 </th>
                    <td><input type="password" title="비밀번호" id="pw" name="pw" value="" maxlength="30" nullable="true" chartype="password" />
                    	<span class="desc blk">영문대문자, 영문소문자, 숫자, 특수문자 조합으로 8자 이상 입력해야 합니다.</span>
                    
                    </td>
                </tr>
            </tbody>
        </table>
        <p class="popTit"><img src="/img/usr/pop/pop_tit_evt_1.gif" alt="신청단체" /></p>
        <table border="1" summary="신청단체의 단체명,단체장,전화번호,휴대전화등 입력 또는 수정하는 표">
            <col width="16%" />
            <col width="84%" />
            <tbody>
                <tr>
                    <th>단체명</th>
                    <td><input type="text" class="big" id="crpNm" name="crpNm" value="${result.crpNm }" maxlength="30" nullable="true" title="단체명" /></td>
                </tr>
                <tr>
                    <th>단체장</th>
                    <td><input type="text" class="big" id="myr" name="myr" value="${result.myr }" maxlength="6" nullable="true" title="단체장" /></td>
                </tr>
                <tr>
                    <th>전화번호</th>
                    <td>
                        <select id="aplcCcpc1" name="aplcCcpc1">
                                <option value="02" <c:if test="${result.aplcCcpc1 == '02' }">selected</c:if> >02</option>
                                <option value="070" <c:if test="${result.aplcCcpc1 == '070' }">selected</c:if> >070</option>
                                <option value="031" <c:if test="${result.aplcCcpc1 == '031' }">selected</c:if> >031</option>
                                <option value="032" <c:if test="${result.aplcCcpc1 == '032' }">selected</c:if> >032</option>
                                <option value="033" <c:if test="${result.aplcCcpc1 == '033' }">selected</c:if> >033</option>
                                <option value="041" <c:if test="${result.aplcCcpc1 == '041' }">selected</c:if> >041</option>
                                <option value="042" <c:if test="${result.aplcCcpc1 == '042' }">selected</c:if> >042</option>
                                <option value="043" <c:if test="${result.aplcCcpc1 == '043' }">selected</c:if> >043</option>
                                <option value="051" <c:if test="${result.aplcCcpc1 == '051' }">selected</c:if> >051</option>
                                <option value="052" <c:if test="${result.aplcCcpc1 == '052' }">selected</c:if> >052</option>
                                <option value="053" <c:if test="${result.aplcCcpc1 == '053' }">selected</c:if> >053</option>
                                <option value="053" <c:if test="${result.aplcCcpc1 == '054' }">selected</c:if> >054</option>
                                <option value="053" <c:if test="${result.aplcCcpc1 == '055' }">selected</c:if> >055</option>
                                <option value="061" <c:if test="${result.aplcCcpc1 == '061' }">selected</c:if> >061</option>
                                <option value="062" <c:if test="${result.aplcCcpc1 == '062' }">selected</c:if> >062</option>
                                <option value="063" <c:if test="${result.aplcCcpc1 == '063' }">selected</c:if> >063</option>
                                <option value="063" <c:if test="${result.aplcCcpc1 == '064' }">selected</c:if> >064</option>
                            </select> - <input type="text" class="phone" title="앞자리" id="aplcCcpc2" name="aplcCcpc2" value="${result.aplcCcpc2 }" maxlength="4" nullable="true" chartype="int" /> - 
                            <input type="text" class="phone" title="뒤 4자리" id="aplcCcpc3" name="aplcCcpc3" value="${result.aplcCcpc3 }" maxlength="4" nullable="true" chartype="int" />
                    </td>
                </tr>
                <tr>
                    <th>휴대전화</th>
                    <td>
                        <select id="aplcHp1" name="aplcHp1">
                              <option value="010" <c:if test="${result.aplcHp1 == '010' }">selected</c:if> >010</option>
                                <option value="011" <c:if test="${result.aplcHp1 == '011' }">selected</c:if> >011</option>
                                <option value="016" <c:if test="${result.aplcHp1 == '016' }">selected</c:if> >016</option>
                                <option value="017" <c:if test="${result.aplcHp1 == '017' }">selected</c:if> >017</option>
                                <option value="019" <c:if test="${result.aplcHp1 == '019' }">selected</c:if> >019</option>
                            </select> - <input type="text" class="phone" title="앞자리" id="aplcHp2" name="aplcHp2" value="${result.aplcHp2 }" maxlength="4" nullable="true" chartype="int" /> - 
                            <input type="text" class="phone" title="뒤 4자리" id="aplcHp3" name="aplcHp3" value="${result.aplcHp3 }" maxlength="4" nullable="true" chartype="int" />
                    </td>
                </tr>
                <tr>
                    <th>이메일</th>
                    <td><input type="text" id="aplcEml1" name="aplcEml1" value="${arrAplcEml[0] }" maxlength="14" nullable="true" title="이메일" style="ime-mode:inactive" /> &#64; <input type="text" id="aplcEml2" name="aplcEml2" value="${arrAplcEml[1] }" maxlength="30" nullable="true" title="이메일" style="ime-mode:inactive" />
                        <input type="hidden" id="aplcEml" name="aplcEml" value="${result.aplcEml }" />    
                    </td>
                </tr>
                <tr>
                    <th>주소</th>
                    <td>
                        <span class="address">
                            <input type="text" class="zipCode" title="우편번호 앞자리" value="${result.zip1 }" id="zip1" name="zip1" readOnly />&nbsp;-&nbsp;<input type="text" class="zipCode" title="우편번호 뒷자리" value="${result.zip2 }" id="zip2" name="zip2" readOnly /> <a href="javascript:void(0);" onclick="popupCenter();"><img src="/img/usr/btn/btn_search.add.gif" alt="우편번호검색" /></a>
                        </span>
                        <span class="address">
                            <input type="text" class="frmAdr" value="${result.adrBasc }" id="adrBasc" name="adrBasc" readOnly /> <input type="text" class="frmAdr" title="나머지 주소" value="${result.adrDtl }" maxlength="60" id="adrDtl" name="adrDtl" />
                        </span>
                    </td>
                </tr>
                <tr>
                    <th>사업명</th>
                    <td><input type="text" title="사업명" value="${result.bzrNm }" id="bzrNm" name="bzrNm" maxlength="30" /></td>
                </tr>
                <tr>
                    <th>첨부파일</th>
                    <td><able:file name="attcFile" fixed="true" filename="" maxsize="30" sizeunit="M" sub="common" classType=""/><span class="attach"><a href="#" onclick="getUpFileDownload('0220','${result.parp02Idx}');return false;">${result.filNm }</a></span>
                        <span class="desc blk">ppt, pptx, ppts, xls, xlsx, hwp, doc, docx, jpg, gif, png, pdf 파일 업로드 가능 <br />10MB이하로 업로드 가능, 이미지의 경우 510*360px 사이즈로 준수해 주시기 바랍니다.</span>
                    </td>
                </tr>
                <tr>
                    <th>내용</th>
                    <td>
                    <textarea rows="7" cols="120" id="sbc" name="sbc">${result.sbc }</textarea></td>
                </tr>
            </tbody>
        </table>
        </form>
        <form id="downloadForm" name="downloadForm" method="post">
            <input type="hidden" id="menuScn" name="menuScn" value="" />
            <input type="hidden" id="idx" name="idx" value="" />
            <input type="hidden" id="filNm" name="filNm" value="" />
        </form>
        <div class="btnPopArea">
            <input type="image" id="rgstButn" name="rgstButn" onClick="return false;" src="/img/usr/btn/btn_pop_reg.gif" title="등록" alt="등록" /><button type="button" onclick="javscript:document.mainForm.reset();"><img src="/img/usr/btn/btn_pop_cancel.gif" alt="취소" /></button>
        </div>
<%
// 등록 process 를 위한 iFrame Start
%>
<iframe name="comIframe" id="comIframe" src="about:blank" height="0" width="0"></iframe>
<%
// 등록 process 를 위한 iFrame END
%>
    </div>
</div>
</body>
</html>